package com.huawei.appgallery.forum.cards.widget;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.LinearLayout;
import androidx.annotation.Nullable;
import huawei.widget.HwTextView;
import java.lang.ref.WeakReference;
import o.azb;
import o.AccountBussinessListener;
import o.ccp;
import o.eod;
import o.eoj;

public class ForumFeedLoginView extends LinearLayout {
    private Context ˊ;
    private b ˋ;

    public interface b {
        void Y_();
    }

    static class c implements AccountBussinessListener {
        private WeakReference<ForumFeedLoginView> ˎ;

        public c(ForumFeedLoginView forumFeedLoginView) {
            this.ˎ = new WeakReference(forumFeedLoginView);
        }

        public void onAccountBusinessResult(ccp o_ccp) {
            eoj.ˋ().ˊ("ForumFeedLoginView");
            ForumFeedLoginView forumFeedLoginView = (ForumFeedLoginView) this.ˎ.get();
            if (forumFeedLoginView != null && forumFeedLoginView.ˋ != null) {
                forumFeedLoginView.ˋ.Y_();
            }
        }
    }

    public void setLoginListener(b bVar) {
        this.ˋ = bVar;
    }

    public ForumFeedLoginView(Context context) {
        super(context);
        ॱ(context);
    }

    public ForumFeedLoginView(Context context, @Nullable AttributeSet attributeSet) {
        super(context, attributeSet);
        ॱ(context);
    }

    public ForumFeedLoginView(Context context, @Nullable AttributeSet attributeSet, int i) {
        super(context, attributeSet, i);
        ॱ(context);
    }

    private void ॱ(Context context) {
        this.ˊ = context;
        LayoutInflater layoutInflater = (LayoutInflater) context.getSystemService("layout_inflater");
        if (layoutInflater != null) {
            View inflate = layoutInflater.inflate(o.bsy.b.ˊ, this);
            azb.ˏ(inflate);
            ((HwTextView) inflate.findViewById(o.bsy.c.ॱˊ)).setOnClickListener(new OnClickListener(this) {
                final /* synthetic */ ForumFeedLoginView ˊ;

                {
                    this.ˊ = r1;
                }

                public void onClick(View view) {
                    this.ˊ.ˋ();
                }
            });
        }
    }

    private void ˋ() {
        eoj.ˋ().ˎ("ForumFeedLoginView", new c(this));
        eod.ॱ(this.ˊ);
    }
}
